package com.zlp.mall.modules.oms.service;

import com.zlp.mall.common.api.Pager;
import com.zlp.mall.modules.oms.dto.*;
import com.zlp.mall.modules.oms.model.Order;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 订单表 服务类
 * </p>
 *
 * @author ZouLiPing
 * @since 2021-11-03
 */
public interface OrderService extends IService<Order> {


    /**
     * 查询订单
     * @param queryParam
     * @param pageSize
     * @param pageNum
     * @date: 2021/12/23 14:34
     * @return: com.zlp.mall.common.api.Pager<com.zlp.mall.modules.oms.model.Order>
     */
    Pager<Order> list(OrderQueryParam queryParam, Integer pageSize, Integer pageNum);

    /**
     * 批量发货
     * @param deliveryParamList
     * @date: 2021/12/23 14:36
     * @return: boolean
     */
    boolean delivery(List<OrderDeliveryParam> deliveryParamList);

    /**
     * 批量关闭订单
     * @param ids
     * @param note
     * @date: 2021/12/23 14:38
     * @return: boolean
     */
    boolean close(List<Long> ids, String note);

    /**
     * 批量删除订单
     * @param ids
     * @date: 2021/12/23 14:40
     * @return: boolean
     */
    boolean delete(List<Long> ids);

    /**
     * 获取订单详情
     * @param id
     * @date: 2021/12/23 14:41
     * @return: com.zlp.mall.modules.oms.dto.OmsOrderDetail
     */
    OmsOrderDetail detail(Long id);

    /**
     * 修改收货人信息
     * @param receiverInfoParam
     * @date: 2021/12/23 14:42
     * @return: int
     */
    int updateReceiverInfo(OmsReceiverInfoParam receiverInfoParam);

    /**
     * 修改订单费用信息
     * @param moneyInfoParam
     * @date: 2021/12/23 14:43
     * @return: int
     */
    int updateMoneyInfo(OmsMoneyInfoParam moneyInfoParam);

    /**
     * 备注订单
     * @param id
     * @param note
     * @param status
     * @date: 2021/12/23 14:44
     * @return: java.lang.Boolean
     */
    Boolean updateNote(Long id, String note, Integer status);
}
